<!DOCTYPE html>
<html>
<head>
   	<title>Light mouse navigation</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myGrid;
		function doOnLoad() {
			myGrid = new dhtmlXGridObject('gridbox');
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
			myGrid.setInitWidths("80,150,120,80,80,80,80,100");
			myGrid.setColAlign("right,left,left,right,center,left,center,center");
			myGrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
			myGrid.attachEvent("onRowSelect",m_f2);
			var combobox = myGrid.getCombo(5);
			combobox.put("1","1 Hour");
			combobox.put("12","12 Hours");
			combobox.put("24","24 Hours");
			combobox.put("48","2 days");
			combobox.put("168","1 week");
			combobox.put("pick","pick up");
			combobox.put("na","na");
			myGrid.setColSorting("int,str,str,int,str,str,str,date");
			myGrid.enableAutoWidth(true);
			myGrid.enableAutoHeight(true);
			myGrid.init();
			myGrid.enableLightMouseNavigation(true);
			myGrid.load("../common/grid.xml");
		}
		function m_f2(id){
			document.getElementById("a_1").innerHTML="Selected row: "+id;
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Light mouse navigation</h1>
	<p>
		You can enable/disable "light mouse navigation" mode<br />
		The keyboard navigation can be disabled/enabled as well
	</p>
	<table width="600">
		<tr>
			<td width="50%" valign="top">
				<div id="gridbox" style="width:100%;height:450px;background-color:white;"></div>
			</td>
		</tr>
		<tr>
			<td>
				<a href="#" onclick="myGrid.enableLightMouseNavigation(true)">enable light mouse navigation</a><br>
				<a href="#" onclick="myGrid.enableLightMouseNavigation(false)">disabel light mouse navigation</a><br>
				<a href="#" onclick="myGrid.enableKeyboardSupport(true)">enable hot keys</a><br>
				<a href="#" onclick="myGrid.enableKeyboardSupport(false)">disable hot keys</a><br>
				<div id="a_1"></div>
			</td>
		</tr>
	</table>
</body>
</html>
